<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <input class="input1" type="text" value="王一博" >
    <input class="input2" type="text" value="肖战" >
    <button onclick="cc()">传参</button>
</body>
</html>
<script>
    var inp1 = document.querySelector(".input1")
    var inp2 = document.querySelector(".input2")
    function cc(){
        console.log(11)
        alert(inp1.value)
        alert(inp2.value)
    }
</script>